﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CourseInfo.aspx.cs" Inherits="ExamAnalysis.BasicInfo.CourseInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:LinqDataSource ID="TeacherInfoLinqDataSource" runat="server" 
        ContextTypeName="ExamAnalysis.Model.ExamAnalysisDataContext" EntityTypeName="" 
        TableName="TeacherInfo">
    </asp:LinqDataSource>
    <asp:LinqDataSource ID="SubjectInfoLinqDataSource" runat="server" 
        ContextTypeName="ExamAnalysis.Model.ExamAnalysisDataContext" EntityTypeName="" 
        TableName="SubjectInfo">
    </asp:LinqDataSource>
    <ext:GridPanel 
            runat="server" 
            ID="ClassInfoGridPanel" 
            Height="420" 
            Width="800"
            Title="班级信息" 
            Frame="true">
            <Store>
                <ext:Store ID="Store2" runat="server" >
                    <Model>
                        <ext:Model ID="Model1" runat="server" Name="CourseInfo" IDProperty="CourseID">
                            <Fields>
                                <ext:ModelField Name="SubjectID"  />
                                <ext:ModelField Name="CourseID" />
                                <ext:ModelField Name="CourseName" />
                                <ext:ModelField Name="CourseCode" />
                                <ext:ModelField Name="TeacherID" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel ID="ColumnModel2" runat="server" >
			    <Columns>                
                    <ext:Column ID="Column1" runat="server" DataIndex="CourseCode" Text="课程编号"  Width="150">
                    <Editor>
                         <ext:TextField ID="TextField1" runat="server" />
                    </Editor>
                    </ext:Column>
                    <ext:Column ID="Column2" runat="server" DataIndex="CourseName" Text="课程名称"  Width="150" >
                    <Editor>
                         <ext:TextField ID="TextField2" runat="server" />
                    </Editor>
                    </ext:Column>
			    </Columns>
            </ColumnModel>    
            <SelectionModel>
              <ext:RowSelectionModel ID="RowSelectionModel3" runat="server" Mode="Single" />
             </SelectionModel>     
             <TopBar>
            <ext:Toolbar ID="Toolbar1" runat="server">
                    <Items>
                    <ext:DropDownField ID="DropDownField1" runat="server" Width="350" FieldLabel="相关科目" Text="全部">
                            <Component>
                                <ext:GridPanel ID="GridPanel1" Height="200" runat="server">

                                    <ColumnModel>
                                        <Columns>
                                            <ext:Column ID="Column12" runat="server" Width="150" Text="科目编号" DataIndex="SubjectCode" />
                                            <ext:Column ID="Column13" runat="server" Width="150" Text="科目名称" DataIndex="SubjectName" />
                                        </Columns>
                                    </ColumnModel>
                                    <SelectionModel>
                                         <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Single" />
                                    </SelectionModel>
                                        <Store>
                    <ext:Store ID="Store1" runat="server" DataSourceID="SubjectInfoLinqDataSource">
                        <Model>
                            <ext:Model ID="Model4" runat="server" IDProperty="SubjectID">
                                <Fields>
                                    <ext:ModelField Name="SubjectID" />
                                    <ext:ModelField Name="SubjectCode" />
                                    <ext:ModelField Name="SubjectName" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <BottomBar>
                <ext:Toolbar ID="Toolbar5" runat="server">
                <Items>
                 <ext:Button ID="Button1" Text="选择" runat="server" OnDirectClick="Button_Click" />
                 </Items>
                </ext:Toolbar>
                </BottomBar>
                                </ext:GridPanel>
                            </Component>
                        </ext:DropDownField>
                    <ext:DropDownField ID="DropDownField2" runat="server" Width="350" FieldLabel="相关教师" Text="全部">
                            <Component>
                                <ext:GridPanel ID="GridPanel2" Height="200" runat="server">

                                    <ColumnModel>
                                        <Columns>
                                            <ext:Column ID="Column3" runat="server" Width="150" Text="教师编号" DataIndex="TeacherCode" />
                                            <ext:Column ID="Column4" runat="server" Width="150" Text="教师姓名" DataIndex="TeacherName" />
                                            <ext:Column ID="Column5" runat="server" Width="150" Text="性别" DataIndex="Sex" >  
                                         </ext:Column>
                                        </Columns>
                                    </ColumnModel>
                                    <SelectionModel>
                                         <ext:RowSelectionModel ID="RowSelectionModel2" runat="server" Mode="Single" />
                                    </SelectionModel>
                                        <Store>
                    <ext:Store ID="Store3" runat="server" DataSourceID="TeacherInfoLinqDataSource">
                        <Model>
                            <ext:Model ID="Model2" runat="server" IDProperty="TeacherID">
                                <Fields>
                                    <ext:ModelField Name="TeacherID" />
                                    <ext:ModelField Name="TeacherName" />
                                    <ext:ModelField Name="TeacherCode" />
                                    <ext:ModelField Name="Sex" />
                                    <ext:ModelField Name="SchoolID" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <BottomBar>
                <ext:Toolbar ID="Toolbar3" runat="server">
                <Items>
                 <ext:Button ID="Button5" Text="选择" runat="server" OnDirectClick="Button_2_Click" />
                 </Items>
                </ext:Toolbar>
                </BottomBar>
                                </ext:GridPanel>
                            </Component>
                        </ext:DropDownField>
                         </Items>
                         </ext:Toolbar>                                  
            </TopBar>
            <BottomBar>
                <ext:Toolbar ID="Toolbar6" runat="server">
                <Items>
                 <ext:Button ID="Button2" Text="添加课程" runat="server" OnDirectClick="Button2_Click" />
                 <ext:Button ID="Button3" Text="更改选中课程" runat="server" OnDirectClick="Button3_Click" />
                 <ext:Button ID="Button4" Text="删除选中课程" runat="server" OnDirectClick="Button4_Click" />
                 </Items>
                </ext:Toolbar>
                </BottomBar>
        </ext:GridPanel>
        <ext:Window 
            ID="FormWindow" 
            runat="server" 
            Title="课程信息编辑" 
            Width="420" 
            Height="300"           
            BodyPadding="10" 
            Resizable="false" 
            Closable="True"
            Layout="Fit" AutoShow="False" HideCollapseTool="False" Hidden="True" HideMode="Visibility">
            <Items>
                <ext:FormPanel 
                    ID="FormPanel1" 
                    runat="server" 
                    Border="false" 
                    BodyStyle="background-color:transparent;"
                    DefaultAnchor="-10"
                    Layout="Form">
                    <Items>
                        <ext:TextField 
                            ID="CourseCode"
                            runat="server" 
                            Name="CourseCode" 
                            MsgTarget="Side" 
                            AllowBlank="false"
                            FieldLabel="课程编号" 
                            />
                        <ext:TextField 
                            ID="CourseName" 
                            runat="server" 
                            Name="CourseName" 
                            MsgTarget="Side" 
                            AllowBlank="false"
                            FieldLabel="课程名称" 
                            />
                            <ext:DropDownField ID="DropDownField3" runat="server" Width="400" FieldLabel="所在科目" Text="请选择">
                            <Component>
                                <ext:GridPanel ID="GridPanel3" Height="200" runat="server">

                                    <ColumnModel>
                                        <Columns>
                                            <ext:Column ID="Column6" runat="server" Width="150" Text="科目编号" DataIndex="SubjectCode" />
                                            <ext:Column ID="Column7" runat="server" Width="150" Text="科目名称" DataIndex="SubjectName" />
                                        </Columns>
                                    </ColumnModel>
                                    <SelectionModel>
                                         <ext:RowSelectionModel ID="RowSelectionModel4" runat="server" Mode="Single" />
                                    </SelectionModel>
                                        <Store>
                    <ext:Store ID="Store4" runat="server" DataSourceID="SubjectInfoLinqDataSource">
                        <Model>
                            <ext:Model ID="Model3" runat="server" IDProperty="SubjectID">
                                <Fields>
                                    <ext:ModelField Name="SubjectID" />
                                    <ext:ModelField Name="SubjectCode" />
                                    <ext:ModelField Name="SubjectName" />
                                    <ext:ModelField Name="SchoolID" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <BottomBar>
                <ext:Toolbar ID="Toolbar7" runat="server">
                <Items>
                 <ext:Button ID="Button6" Text="选择" runat="server" OnDirectClick="Button5_Click" />
                 </Items>
                </ext:Toolbar>
                </BottomBar>
                                </ext:GridPanel>
                            </Component>
                        </ext:DropDownField>
                        <ext:DropDownField ID="DropDownField4" runat="server" Width="400" FieldLabel="相关教师" Text="请选择">
                            <Component>
                                <ext:GridPanel ID="GridPanel4" Height="200" runat="server">

                                    <ColumnModel>
                                        <Columns>
                                            <ext:Column ID="Column8" runat="server" Width="150" Text="教师编号" DataIndex="TeacherCode" />
                                            <ext:Column ID="Column9" runat="server" Width="150" Text="教师姓名" DataIndex="TeacherName" />
                                            <ext:Column ID="Column10" runat="server" Width="150" Text="性别" DataIndex="Sex" >  
                                         </ext:Column>
                                        </Columns>
                                    </ColumnModel>
                                    <SelectionModel>
                                         <ext:RowSelectionModel ID="RowSelectionModel5" runat="server" Mode="Single" />
                                    </SelectionModel>
                                        <Store>
                    <ext:Store ID="Store5" runat="server" DataSourceID="TeacherInfoLinqDataSource">
                        <Model>
                            <ext:Model ID="Model5" runat="server" IDProperty="TeacherID">
                                <Fields>
                                    <ext:ModelField Name="TeacherID" />
                                    <ext:ModelField Name="TeacherName" />
                                    <ext:ModelField Name="TeacherCode" />
                                    <ext:ModelField Name="Sex" />
                                    <ext:ModelField Name="SchoolID" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <BottomBar>
                <ext:Toolbar ID="Toolbar4" runat="server">
                <Items>
                 <ext:Button ID="Button9" Text="选择" runat="server" OnDirectClick="Button_5_Click" />
                 </Items>
                </ext:Toolbar>
                </BottomBar>
                                </ext:GridPanel>
                            </Component>
                        </ext:DropDownField>                  
                    </Items>
                </ext:FormPanel>
            </Items>
            <BottomBar>
        <ext:Toolbar ID="Toolbar2" runat="server">
                    <Items>
                        <ext:Button ID="Button7" runat="server" Icon="Add" Text="添加" Visible="true">
                          <DirectEvents>
                                <Click OnEvent="Add_Click" />
                           </DirectEvents>
                        </ext:Button>      
                         <ext:Button ID="Button8" runat="server" Icon="Accept" Text="更新" Visible="true">
                          <DirectEvents>
                                <Click OnEvent="Change_Click" />
                           </DirectEvents>
                        </ext:Button>              
                        <ext:ToolbarFill ID="ToolbarFill1" runat="server" /> 
                    </Items>
                </ext:Toolbar>
            </BottomBar>
        </ext:Window>
</asp:Content>